<style>
    .login_box_header{
        width: 100%;
        font-weight: 800;
        font-size: 36px;
        color: #7FB0D4;
        text-align: center;
    }
    .login-box {
        width: 676px;
        padding: 5px;
        position: absolute;
        right: 5%;
    }
    .login-box-msg, .register-box-msg{
        padding: 20px 20px 20px;
    }
    .register-box{
        width: 676px !important;
    }
    .login-card-body {
        width: 676px;
        height: 486px;
        padding: 1.5rem 1.8rem 1.6rem;
        background: url('{{url(config('admin.background_input_image'))}}') no-repeat !important;
        background-size: 676px 486px !important;
        background-position: left center !important;
        /*background: rgba(255,255,255,0)!important;*/
    }
    .card{
        background-color: transparent;
    }

    .card, .card-body {
        border-radius: .25rem;
    }
    .login-btn {
        padding-left: 2rem!important;;
        padding-right: 1.5rem!important;
    }
    .content {
        overflow-x: hidden;
    }
    .form-group .control-label {
        text-align: left;
    }
    .login-logo{
        font-weight: 600;
        font-size:2.7rem;
    }
    div.form-control, input.form-control{
        min-height: 56px;
    }
    .form-control-position{
        top: 1rem;
    }
    .form-control:focus{
        background-color:  rgba(0,123,251,0.4);
    }
    .form-control{
        background-color:  rgba(0,123,251,0.4);
    }

    .form-label-group{
        /* 标准语法 */
        input::placeholder {
            color: white;
            font-size: 1rem;
        }

        /* WebKit 浏览器 */
        input::-webkit-input-placeholder {
            color: white;
        }

        /* Mozilla Firefox 4 - 18 */
        input:-moz-placeholder {
            color: white;
        }

        /* Mozilla Firefox 19+ */
        input::-moz-placeholder {
            color: white;
        }

        /* Internet Explorer 10+ */
        input:-ms-input-placeholder {
            color: white;
        }


    }



    input[value] {
        color: white !important;
        font-size: 1.2rem;
        padding-left: 4.5rem !important;
    }

    #login-form{
        width: 70%;
        margin: 3.8rem auto;
    }


    input:-internal-autofill-selected{
        background-color:  rgba(0,123,251,0.4) !important;
    }

</style>

<div class="login-page bg-40"  style="background-image: url('{{url(config('admin.background_image'))}}') !important;; background-size: cover !important;; background-position: center !important;;">
    <div class="login-box">

        <div class="card"  >
            <div class="card-body login-card-body shadow-100">
                <p class="login-box-msg mt-1 mb-1" style="font-size: 25px;color: #A9B8CB;">材料管控系统</p>

                <form id="login-form" method="POST" action="{{ admin_url('auth/login') }}">

                    <input type="hidden" name="_token" value="{{ csrf_token() }}"/>

                    <fieldset class="form-label-group form-group position-relative has-icon-left">
                        <input
                            type="text"
                            class="form-control {{ $errors->has('username') ? 'is-invalid' : '' }}"
                            name="username"
                            placeholder="{{ trans('admin.username') }}"
                            value="{{ old('username') }}"
                            required
                            autofocus
                        >

                        <div class="form-control-position">
                            <i class="feather icon-user" style="color:white;font-size: 1.5rem; padding-left: 2rem"></i>
                        </div>

                        <label for="email" style="font-size: 1rem">{{ trans('admin.username') }}</label>

                        <div class="help-block with-errors"></div>
                        @if($errors->has('username'))
                            <span class="invalid-feedback text-danger" role="alert">
                                            @foreach($errors->get('username') as $message)
                                    <span class="control-label" for="inputError"><i class="feather icon-x-circle"></i> {{$message}}</span><br>
                                @endforeach
                                        </span>
                        @endif
                    </fieldset>

                    <fieldset class="form-label-group form-group position-relative has-icon-left">
                        <input
                            minlength="5"
                            maxlength="20"
                            id="password"
                            type="password"
                            class="form-control {{ $errors->has('password') ? 'is-invalid' : '' }}"
                            name="password"
                            placeholder="{{ trans('admin.password') }}"
                            required
                            autocomplete="current-password"
                            style="padding-left: 4.5rem;color: white"
                        >

                        <div class="form-control-position">
                            <i class="feather icon-lock" style="color:white;font-size: 1.5rem; padding-left: 2rem"></i>
                        </div>
                        <label for="password">{{ trans('admin.password') }}</label>

                        <div class="help-block with-errors"></div>
                        @if($errors->has('password'))
                            <span class="invalid-feedback text-danger" role="alert">
                                            @foreach($errors->get('password') as $message)
                                    <span class="control-label" for="inputError"><i class="feather icon-x-circle"></i> {{$message}}</span><br>
                                @endforeach
                                            </span>
                        @endif

                    </fieldset>
                    <div class="form-group d-flex justify-content-between align-items-center">
                        <div class="text-left">
                            @if(config('admin.auth.remember'))
                                <fieldset class="checkbox">
                                    <div class="vs-checkbox-con vs-checkbox-primary">
                                        <input id="remember" name="remember"  value="1" type="checkbox" {{ old('remember') ? 'checked' : '' }}>
                                        <span class="vs-checkbox">
                                                        <span class="vs-checkbox--check">
                                                          <i class="vs-icon feather icon-check"></i>
                                                        </span>
                                                    </span>
                                        <span style="color: #fff;"> {{ trans('admin.remember_me') }}</span>
                                    </div>
                                </fieldset>
                            @endif
                        </div>
                    </div>
                    <button type="submit" class="btn btn-primary float-right login-btn">

                        {{ __('admin.login') }}
                        &nbsp;
                        <i class="feather icon-arrow-right"></i>
                    </button>
                </form>

            </div>
        </div>
    </div>
</div>

<script>
    Dcat.ready(function () {
        // ajax表单提交
        $('#login-form').form({
            validate: true,
        });
    });
</script>
